package com.licq.ldoc.parser.impl.annotation;

import java.lang.annotation.Annotation;

import com.derbysoft.remote.share.metadata.annotation.Comment;
import com.licq.ldoc.domain.AbstractNode;
import com.licq.ldoc.parser.AnnotationParsee;
import com.licq.ldoc.parser.impl.TargetIgnorableAnnotationParsee;

public class CommentAnnotationParsee extends
		TargetIgnorableAnnotationParsee {

	public CommentAnnotationParsee(AnnotationParsee successor) {
		super(successor);
	}

	@Override
	protected void doParseTo(AbstractNode node, Annotation annotation) {
		String comment = ((Comment) annotation).value()
				.replaceAll("\r\n", "\n");
		node.prependComments(comment);
	}

}
